Skip to content

fix(ci): pin smoketest Node to package.json devEngines version#174

Merged
nedtwigg merged 1 commit into
mainfrom
fix/ci-smoketest-node-pin-28224208309
Jun 29, 2026
Merged

fix(ci): pin smoketest Node to package.json devEngines version#174
nedtwigg merged 1 commit into
mainfrom
fix/ci-smoketest-node-pin-28224208309

Conversation

@dormouse-bot

Copy link
Copy Markdown
Collaborator

Problem

The Standalone Smoketest CI job started failing on every PR with:

failed to prepare bundled Node.js runtime: "bundled Node.js 22.23.0 does not match
the package.json devEngines.runtime.version pin 22.22.3. ..."

The smoketest runs cargo check in standalone/src-tauri, which executes build.rs. That script resolves Node via node -p process.execPath (the PATH node) and fails the build unless its version exactly equals package.json's devEngines.runtime.version pin (22.22.3).

The job set up Node with a bare node-version: 22, which tracks whatever 22.x the GitHub runner image happens to ship. The runner's 22.x line recently advanced from 22.22.3 to 22.23.0, so the exact-match check in build.rs began failing — even though the pin itself never changed. This is environmental drift, not a code regression, and it affects every PR and main push that runs the smoketest.

Fix

Drive setup-node from the pin instead of a bare major version, so the exact pinned Node is provisioned regardless of the runner default. This mirrors the existing build-standalone job in release.yml, which already reads devEngines.runtime.version via jq and feeds it to setup-node — and matches the contract build.rs documents ("CI reads the same field to drive actions/setup-node").

Only the standalone-smoketest job needs this: it is the one that runs cargo check directly. The build-and-test job runs everything through pnpm, where devEngines (onFail: "download") already provisions the pinned Node for scripts.

Testing

No unit test is feasible for a CI workflow change — the verification is the Standalone Smoketest check on this PR going green, which exercises the exact path that is currently red on other open PRs. With the pin-driven setup-node, the runner installs 22.22.3 and build.rs's version check passes.

This is intentionally not a pin bump (22.22.322.23.0): the disclosed runtime version is a supply-chain-controlled value that should advance through the maturity-window dependency path, not a CI convenience edit.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4fb153f
Status: ✅  Deploy successful!
Preview URL: https://86304273.mouseterm.pages.dev
Branch Preview URL: https://fix-ci-smoketest-node-pin-28.mouseterm.pages.dev

View logs

@dormouse-bot

Copy link
Copy Markdown
Collaborator Author

This same failure just hit main again in run 28394052881 (commit dd1f381, "docs: fix stale PendingShellOpts.command comment"). The Standalone Smoketest job failed with the identical error this PR fixes:

failed to prepare bundled Node.js runtime: "bundled Node.js 22.23.0 does not match the package.json devEngines.runtime.version pin 22.22.3. ..."

This PR's checks (including Standalone Smoketest) are green, so merging it should clear the recurring main breakage. Flagging so it's on the radar — no separate fix PR is warranted since this one already covers the root cause.

@dormouse-bot

Copy link
Copy Markdown
Collaborator Author

This same failure has now hit main — CI run 28394018415 on commit ad0616d (fix: regenerate dependencies-cargo.json for direct objc2 deps (#166)) failed in Standalone Smoketest → Cargo check with the identical error:

failed to prepare bundled Node.js runtime: "bundled Node.js 22.23.0 does not match
the package.json devEngines.runtime.version pin 22.22.3. ..."

The standalone-smoketest job on main still sets up Node with a bare node-version: 22 (.github/workflows/ci.yml), so it picks up the runner's current 22.23.0 instead of the pinned 22.22.3 — exactly the drift this PR fixes. Merging this PR will turn the default branch green again. No new PR needed; flagging here to surface that the default branch is now affected, not just open PRs.

@nedtwigg nedtwigg merged commit 34b4c94 into main Jun 29, 2026
4 checks passed
@nedtwigg nedtwigg deleted the fix/ci-smoketest-node-pin-28224208309 branch June 29, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants